import java.util.ArrayList;
import java.util.List;
public class ClassGroup {
    private String name;
    private List<Group> groups = new ArrayList<>();
    private List<Student> allStudents = new ArrayList<>();
    public ClassGroup(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public List<Group> getGroups() {
        return groups;
    }
    public void addGroup(Group group) {
        groups.add(group);
    }
    public List<Student> getAllStudents() {
        return allStudents;
    }
    public void addStudent(Student student) {
        allStudents.add(student);
    }
    @Override
    public String toString() {
        return "班级{" +
                "名称='" + name + '\'' +
                ", 小组数量=" + groups.size() +
                ", 总学生数=" + allStudents.size() +
                '}';
    }
}